﻿using System;

namespace YaTools.Yaml
{
    [AttributeUsage(AttributeTargets.Property | AttributeTargets.Parameter,
        AllowMultiple = false, Inherited = false)]
    public sealed class YamlTagPropertyAttribute : Attribute
    {
        /// <summary>
        /// All YamlTagPropertyAttributes are created equal 
        /// </summary>
        public override bool Equals(object obj)
        {
            if (ReferenceEquals(obj, this)) return true;
            var other = obj as YamlTagPropertyAttribute;
            return other != null;
        }

        /// <summary>
        /// Returns a constant hash value for all instances of this class
        /// </summary>
        public override int GetHashCode()
        {
            return GetType().GetHashCode();
        }
    }
}